package com.k2data.k2app.domain.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.k2data.k2app.constant.Constant;
import lombok.Data;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.time.ZonedDateTime;

/**
 * @author lidong9144@163.com 17-3-20.
 */
@Data
@Table(name = "susb_time_index")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SusbTimeIndex {

    @JsonIgnore
    @Id
    @GeneratedValue(generator = "JDBC")
    private Long id;
    private Long deviceId;
    private Integer keyId;
    @JsonFormat(pattern = Constant.ISO_FORMAT)
    private ZonedDateTime startTime;
    @JsonFormat(pattern = Constant.ISO_FORMAT)
    private ZonedDateTime stopTime;
    private Integer type;
    private Integer kind;
    private String timeZone;
    @JsonIgnore
    private ZonedDateTime createTime;
    @JsonIgnore
    private ZonedDateTime updateTime;

    @JsonIgnore
    @Transient
    private String order;
    @JsonIgnore
    @Transient
    private Long customerId;
    @Transient
    private Double hours;
    @Transient
    private Double days;
    @JsonIgnore
    @Transient
    private Integer year;
    @Transient
    private String deviceNo;
    @Transient
    private String deviceName;

}
